Mechanical drive systems in vehicles are gradually replaced with electrical drive—by-wire—systems, for space efficiency, assemblability, controllability and the like, where the mechanism of the drive system is driven by motors. An example of such a replacement is found in the field of mechanical transmission, for example, in a shift position switching mechanism driven by a motor. In such a system, the drive control of the motor is performed based on an encoder count, or counting the number of pulse signals from the encoder installed in the motor. The motor is then rotated to a position that corresponds to the target shift position (i.e., to the target encoder count), to switch the shift positions.
In such a system, a reference position of the rotation drive of the motor is learned based on a method disclosed in Japanese patent No. 4248290, for example. The method disclosed in such a document rotates the motor toward one dead-end (i.e., P wall) on a P position side of the position switching mechanism, and the reference position of the P position side is learned based on a constant encoder count, i.e., when the encoder count stays at a maximum value, or at a minimum value for a certain period of time.
However, the method in the above-mentioned patent document 1 forces the motor to rotate for a certain period of time at the dead-end rotation position, thereby forcing the motor and the switching mechanism to warp and twist when learning the reference position, which may be undesirable in terms of the product life and durability of the motor. In addition, the learning time for learning such a reference position is long, and the power consumption of the motor will not be saved for such period.